@ibiz-template-plugin/ai-chat 0.0.97 → 0.0.98

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.es.js CHANGED
@@ -22347,7 +22347,10 @@ class Ac {
22347
22347
  */
22348
22348
  async searchAIAgent(e) {
22349
22349
  let t = [];
22350
- return this.opts.fetchAgentList ? t = (await this.opts.fetchAgentList(e) || []).map(
22350
+ return this.opts.fetchAgentList ? t = (await this.opts.fetchAgentList({
22351
+ query: e,
22352
+ agentid: this.activeAIAgentID || this.opts.activeAIAgentID
22353
+ }) || []).map(
22351
22354
  (r) => new _c(r, {
22352
22355
  chunkrerank: this.opts.reRankDefaultValue,
22353
22356
  maxchunks: this.opts.maxChunksDefaultValue,
@@ -23351,7 +23354,9 @@ class Nf {
23351
23354
  var o;
23352
23355
  e.chatOptions.language && C.setLanguage(e.chatOptions.language), e.chatOptions.locale && C.setLocale(e.chatOptions.locale), this.resourceOptions = e.resourceOptions, (((o = e.resourceOptions) == null ? void 0 : o.resourceMode) || "LOCAL") === "LOCAL" && await this.initIndexDB(), this.backupChatOptions = e;
23353
23356
  const i = e.chatOptions;
23354
- this.setupContainer(e, i), !i.aiAgentlist && i.fetchAgentList && (i.aiAgentlist = await i.fetchAgentList()), !i.aiknowledgeBasesList && i.fetchKnowledgeBaseList && i.enableKnowledgeBaseSelect ? i.aiknowledgeBasesList = await i.fetchKnowledgeBaseList() : i.aiknowledgeBasesList = [];
23357
+ this.setupContainer(e, i), !i.aiAgentlist && i.fetchAgentList && (i.aiAgentlist = await i.fetchAgentList({
23358
+ agentid: i.activeAIAgentID
23359
+ })), !i.aiknowledgeBasesList && i.fetchKnowledgeBaseList && i.enableKnowledgeBaseSelect ? i.aiknowledgeBasesList = await i.fetchKnowledgeBaseList() : i.aiknowledgeBasesList = [];
23355
23360
  let r;
23356
23361
  !e.chatOptions.isSimple && e.mode && e.mode === "TOPIC" ? (this.aiTopic.injectResourceOptions(e.resourceOptions), r = e.topicOptions, Object.assign(r, {
23357
23362
  aiChat: {